home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / DomonicDefence4.swf / scripts / frame_16 / PlaceObject2_1313_499 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2005-09-27  |  552 b   |  25 lines

  1. onClipEvent(enterFrame){
  2.    if(shoot == true && ready != true)
  3.    {
  4.       this._x = _root.dragony._x + 115;
  5.       xValueThis = _root.dragony._x + 115;
  6.       this._y = _root.dragony._y + 10;
  7.       ready = true;
  8.    }
  9.    if(shoot == true)
  10.    {
  11.       this._y += 1 + gravity;
  12.       gravity += 0.5;
  13.       xThingAdd = (aimX - xValueThis) / 20;
  14.       if(this._x < aimX)
  15.       {
  16.          this._x += xThingAdd;
  17.       }
  18.       if(this.hitTest(_root.ground))
  19.       {
  20.          this.shoot = false;
  21.          this.gotoAndPlay(2);
  22.       }
  23.    }
  24. }
  25.